package org.example.demo15_command.demo1;

import org.example.demo15_command.demo1.AbstractCommand;

public class Controller {
    private AbstractCommand openCommand,closeCommand;
    public Controller(AbstractCommand openCommand,AbstractCommand closeCommand){
        this.openCommand = openCommand;
        this.closeCommand = closeCommand;
    }
    public void open(){
        openCommand.execute();
    }
    public void close(){
        closeCommand.execute();
    }
}
